import type { Config } from 'vike/types'
import vikeVue from 'vike-vue/config'
import vikeVuePinia from 'vike-vue-pinia/config'
import LayoutMain from '../../layouts/LayoutMain.vue'
export default {
  title: '在线编辑器',
  meta: {
    title: {
      //使`title`的值在客户端和服务器端可用
      env: { server: true, client: true }
    },
    description: {
      //使`description`的值在客户端和服务器端可用
      env: { server: true,client: true }
    },
    keywords: {
      //使`keywords`的值在客户端和服务器端可用
      env: { server: true,client: true }
    },
    data: {
      //使`data`的值在客户端和服务器端可用
      env: { server: true, client: true }
    },
    Layout: {
      env: { server: true, client: true },
      cumulative: true,
    }
  },
  clientRouting: true,
  Layout: LayoutMain,
  extends: [vikeVue, vikeVuePinia],
  passToClient: ['pageProps','routeParams','data','pageContext'],
  ssr: true,
} satisfies Config

/* 额外定义的变量才可以再内部引用 */
declare global {
  namespace Vike {
    interface Config {
      description?: string
      keywords?: string
      siteName?: string
    }
  }
}